#include "YGSpriteEx.h"

namespace YoghurtGum
{

	SpriteEx::SpriteEx(float a_Delay)
	{
		m_Current = 0;
		m_Total = 0;
		m_Delay = a_Delay;
		m_Time = 0.f;
	}

	SpriteEx::~SpriteEx()
	{

	}

	void SpriteEx::Tick(float a_DeltaTime)
	{
		if (m_Total > 1)
		{
			m_Time += a_DeltaTime;
			if (m_Time > m_Delay) 
			{
				m_Time -= m_Delay;
				NextFrame();
			}
		}
	}
	
}; // namespace YoghurtGum